﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="ListMesaages.aspx.cs" Inherits="ListMesaages" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
    <link href="../../../../resources/css/examples.css" rel="stylesheet" type="text/css" />
    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <ext:Store ID="Store1" runat="server" OnRefreshData="Store1_RefreshData">
        <Reader>
            <ext:JsonReader>
                <Fields>
                    <ext:RecordField Name="messageId" />
                    <ext:RecordField Name="estateId" />
                    <ext:RecordField Name="messageSubject" />
                    <ext:RecordField Name="messageContent" />
                    <ext:RecordField Name="senderNameSurname" />
                    <ext:RecordField Name="senderEmail" />                    
                    <ext:RecordField Name="senderPhone" />
                    <ext:RecordField Name="messageDate" />
                    
                </Fields>
            </ext:JsonReader>
        </Reader>
    </ext:Store>
    <ext:GridPanel ID="GridPanel1" runat="server" StoreID="Store1" Title="Message List"
        Width="790" Height="320">
        <ColumnModel ID="ColumnModel1" runat="server">
            <Columns>
                <ext:Column Header="Message ID" DataIndex="messageId" />                
                <ext:Column Header="EstateID" DataIndex="estateId" />
                <ext:Column Header="Subject" DataIndex="messageSubject" />
                <ext:Column Header="Content" DataIndex="messageContent" />
                <ext:Column Header="Customer" DataIndex="senderNameSurname" />
                <ext:Column Header="Sender Email" DataIndex="senderEmail" />
                <ext:Column Header="Phone" DataIndex="senderPhone" />
                <ext:Column Header="Message Date" DataIndex="messageDate" />                                                
            </Columns>
        </ColumnModel>        
        
        <SelectionModel>
            <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" />
        </SelectionModel>
        <LoadMask ShowMask="true" />
        <BottomBar>
            <ext:PagingToolbar ID="PagingToolbar1" runat="server" PageSize="10" StoreID="Store1" />
        </BottomBar>
    </ext:GridPanel>
    <ext:Label ID="idshower" runat="server"></ext:Label>
</asp:Content>